<!DOCTYPE html>
<html>
<head>
	<title>{$site_name}-{$post_title} </title>
	<meta name="keywords" content="{$post_keywords}" />
	<meta name="description" content="{$post_excerpt}">
	<tc_include file="Public:head" />
	<style>
		#article_content img{height:auto !important}
	</style>
	
	<script src="__TMPL__Public/statics/lightbox/layer/layer.min.js"></script>
	<link  href="__TMPL__Public/statics/videojs/reveal.css" rel="stylesheet" />
</head>
<body class="">
<tc_include file="Public:nav" />

<php>
	$index_cid=I("cid");
	$records = sp_get_child_terms($index_cid);
	$newid 		= -1;
	$scheduleid = -1;
	$imageid 	= -1;
	foreach($records as $key=>$vo )
	{
		if("相关新闻" ==$vo["name"]){
			$newid = $vo["term_id"];
		}else if("明星档期" ==$vo["name"]){
			$scheduleid = $vo["term_id"];
		}else if("相关影像" ==$vo["name"]){
			$imageid = $vo["term_id"];
		}
	}
</php>
<!--news start by z-->
<section class="z-news">
	<div class="star-profile">
		{$post_content}
	</div>
	<div class="star-profile display">
		<div class="star-photo-con">
			<img src="/sunshine/themes/simplebootx/Public/statics/style/images/star-photo.png" alt="" />
		</div>
		<div class="star-info-con">
			<div class="star-info-CNname"><span>王凯</span></div>
			<div class="star-info-Enname"><span>Wang Kai</span></div>
			<div class="star-Constellation"><span class="starinfo-left">星座</span><span class="starinfo-right">狮子座</span></div>
			<div class="star-blood"><span class="starinfo-left">血型</span><span class="starinfo-right">A </span></div>
			<div class="star-height"><span class="starinfo-left">身高</span><span class="starinfo-right">182cm </span></div>
			<div class="star-weight"><span class="starinfo-left">体重</span><span class="starinfo-right">70kg</span></div>
			<div class="star-addr"><span class="starinfo-left">出生地</span><span class="starinfo-right">湖北武汉 </span></div>
			<div class="birth"><span class="starinfo-left">生日</span><span class="starinfo-right">1982年8月18日（农历六月二十九）</span></div>
			<div class="star-colleage"><span class="starinfo-left">毕业院校</span><span class="starinfo-right">中央戏剧学院03级表演本科</span></div>
			<div class="star-works"><span class="starinfo-left">代表作品</span><span class="starinfo-right">新神探联盟、北平无战事、伪装者、琅琊榜 </span></div>
			<div class="star-awards"><div class="starinfo-left">主要成就</div><div class="starinfo-right">“风从东方来”娱乐影响力盛典“年度最具人气电视剧演员”奖<br>
				 2015国剧盛典内地最具人气演员<br>
				 2015国剧盛典年度演技飞跃演员<br></div>
			</div>
			<div class="star-shop-con">
				<img class="cursor-pointer" src="/sunshine/themes/simplebootx/Public/statics/style/images/star-shop.png"/>
			</div>
		</div>
	</div>
	<div class="star-tabs">
		<ul class="tab-control">
			<li id="tab-control1" class="tab-btn tab-btn-active">相关新闻</li>
			<li id="tab-control2" class="tab-btn">明星档期</li>
			<li id="tab-control3" class="tab-btn">相关影像</li>
		</ul>
		<ul class="tab-contents">
			<li id="tab-content1" class="tab-content">
				<php>
				$index_cid=$newid;// 公司资讯id
				$lastnews=sp_sql_posts("cid:$index_cid;field:post_date,post_title,post_excerpt,tid,smeta;order:listorder asc;limit:4;"); 
				</php>
				<foreach name="lastnews" item="vo">
				<php>$smeta=json_decode($vo['smeta'],true);$d = $vo['post_date'];</php>
				<!--one news cell by z-->
				<div class="z-news-cell">
					<div class="newscontent  text-center"  data-href="{:leuu('article/index',array('id'=>$vo['tid'],'cid'=>$vo['term_id']))}">
						<div class="z-cell-date">
							<div class="zcell-d-m"><php>echo date('m',strtotime($d));</php>/<php>echo date('d',strtotime($d));</php></div>
							<div class="zcell-year"><php>echo date('Y',strtotime($d));</php></div>
						</div>
						<div class="z-cell-content">
							<div class="zcell-title">{$vo['post_title']}</div>
							<div class="zcell-brief">{$vo['post_excerpt']}</div>
						</div>
						<i class="icon-angle-right fr"></i>
					</div>
				</div>
				</foreach>
			</li>
			<li id="tab-content2" class="tab-content">
				<php>
				$index_cid=$scheduleid;// 公司资讯id
				$lastnews=sp_sql_posts("cid:$index_cid;field:post_date,post_title,post_excerpt,tid,smeta;order:listorder asc;limit:4;"); 
				</php>
				<volist name="lastnews" id="vo">
				<php>$smeta=json_decode($vo['smeta'],true);$d = $vo['post_date'];</php>
				<php>if($key==0){ 
						$class=" fisrt-star-date ";
					}else if($key==(count($lastnews)-1)){
						$class=" last-star-date ";
					} else{
						$class="  ";
					}
				</php>
				<!--中间档期-->
				<div class="z-star-date {$class}">
					<div class="newscontent  text-center">
						<div class="z-cell-date">
							<div class="zcell-d-m"><php>echo date('m',strtotime($d));</php>/<php>echo date('d',strtotime($d));</php></div>
							<div class="zcell-year"><php>echo date('Y',strtotime($d));</php></div>
						</div>
						<div class="starline-line"></div>
						<div class="starline-reddot"></div>
						
						<div class="z-star-date-right">
							<div class="zcell-title">{$vo['post_title']}</div>
						</div>
					</div>
				</div>
				</volist>
			</li>
			<li id="tab-content3" class="tab-content yingxiang">
				<php>
				$index_cid=$imageid;// 公司资讯id
				$lastnews=sp_sql_posts("cid:$index_cid;field:post_date,post_title,post_content,post_excerpt,tid,smeta;order:listorder asc;limit:4;"); 
				</php>
				<volist name="lastnews" id="vo">
				<php>$smeta=json_decode($vo['smeta'],true);</php>
				<php>$photos = $smeta["photo"];</php>
				<!--one news cell by z-->
				<div  class="male-star-item">
					<img src="{:sp_get_asset_upload_path($smeta['thumb'])}" alt="{$vo.post_title}" />
					<div class="star-name">{$vo.post_title}</div>
					<if condition="!empty($photos)">
						<div id="imgs" class="display image-container">
						<foreach name="photos" item="vo">
							<img src="{:sp_get_asset_upload_path($vo['url'])}"/>
						</foreach>
						</div>
					</if>
					<php>
						if(strpos($vo["post_content"],"video-js")&&strpos($vo["post_content"],"edui-upload-video") )
						{
							echo $vo["post_content"];
						}
					</php>
				</div>
				</volist>
			</li>
		</ul>
	</div>
</section>
<!--news end by z-->
<div id="myModal" class="reveal-modal">
	<div id="video-view" style=" text-align: center;"></div>
	<div class="xubox_imgbar" style="text-align: center;">
	<span class="xubox_imgtit"><a class="xubox_imgtit-title"></a></span>
	</div>
	<span class="xubox_setwin"><a class="close-reveal-modal xubox_close xulayer_png32 xubox_close0 xubox_close1" href="javascript:;" style=""></a></span>
</div>

<tc_include file="Public:footer"/>
<tc_include file="Public:scripts"/>
<script src="__TMPL__Public/statics/videojs/jquery.reveal.js"></script>
<script src="__TMPL__Public/statics/videojs/jquery.metadata.js"></script>
<script src="__TMPL__Public/statics/videojs/jquery.media.js"></script> 
<script>
;!function(){
	layer.use('extend/layer.ext.js', function(){
		//初始加载即调用，所以需放在ext回调里
		
		$('.male-star-item').click(function(){
			var box = $(this);
			var imgsBox = $(this).find('.image-container');
			var title =  $(this).find('.star-name').html();
			if(imgsBox.length){
				layer.photos({
					page: { //直接获取页面指定区域的图片，他与上述异步不可共存，只能择用其一。
						parent:imgsBox,  //图片的父元素选择器，如'#imsbox',
						start: 0, //初始显示的图片序号，默认0
						title:title //相册标题
					}
				});
			}else{
				var video = box.find(".video-js");
				
				$("#myModal").find(".xubox_imgtit-title").html(title);
				$("#video-view").html(video.parent("p").html());
				$('#myModal').reveal();
				var h = $('#myModal').height()-$("#video-view").height();
				$("#video-view").css("margin-top",h/2);
				$("#video-view").find("video")[0].play();
			}
			
		});

	});
}();
</script>

<script>

$(function() {

	$("#tab-control1").click(function(){
		if($("#tab-content1").is(":hidden")){
			$(".tab-btn").removeClass("tab-btn-active");
			$(this).addClass("tab-btn-active");
			$(".tab-content").fadeOut(300);
			$("#tab-content1").delay(200).fadeIn(300);
		}
	});
	$("#tab-control2").click(function(){
		if($("#tab-content2").is(":hidden")){
			$(".tab-btn").removeClass("tab-btn-active");
			$(this).addClass("tab-btn-active");
			$(".tab-content").fadeOut(300);
			$("#tab-content2").delay(200).fadeIn(300);
		}
	});
	$("#tab-control3").click(function(){
		if($("#tab-content3").is(":hidden")){
			$(".tab-btn").removeClass("tab-btn-active");
			$(this).addClass("tab-btn-active");
			$(".tab-content").fadeOut(300);
			$("#tab-content3").delay(200).fadeIn(300);
		}
	});
	
	
	//lightbox
	$("#tab-content3 img").click(function(){
		$(".popup-lightbox").fadeIn(400);
	});
	$(".light-box-close").click(function(){
		$(".popup-lightbox").fadeOut(400);
	});
});

</script>


</body>
</html>